Skip to content

Igor/campaigns v0#61

Merged
igor47 merged 20 commits intomainfrom
igor/campaigns-v0
Dec 10, 2025
Merged

Igor/campaigns v0#61
igor47 merged 20 commits intomainfrom
igor/campaigns-v0

Conversation

@igor47
Copy link
Owner

@igor47 igor47 commented Dec 10, 2025

fixes #11

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements the initial version of campaigns functionality, allowing users to create campaigns, invite members with different roles (DM, player, viewer), manage characters within campaigns, and handle various campaign-related operations. The implementation includes comprehensive database models, service layers, route handlers, UI components, and extensive test coverage.

Key Changes:

  • Added complete campaigns infrastructure with database models for campaigns, campaign members, and campaign characters
  • Implemented role-based access control (DM, player, viewer) with specific permissions and workflows
  • Refactored modal system from editModal to detailModal for better semantic naming
  • Added character authorization for DMs and party members to view characters in shared campaigns
  • Implemented user profile management with optional display names

Reviewed changes

Copilot reviewed 96 out of 98 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/db/campaigns.ts New database operations for campaign CRUD, archiving, and name validation
src/db/campaign_members.ts Campaign membership management with role handling and invite tokens
src/db/campaign_characters.ts Character-campaign associations with reveal/hide functionality for NPCs
src/services/campaigns/*.ts Complete service layer for campaign operations (create, invite, authorize, role changes, etc.)
src/routes/campaigns.tsx Campaign routes with comprehensive permission checks and HTMX integration
src/routes/campaigns.test.ts Extensive test coverage for all campaign operations (2553 lines)
src/routes/auth.tsx Invite magic link handling with account switching support
src/routes/profile.tsx New profile page for user name management
src/components/ui/DetailModal.tsx Refactored modal component from ModalContent with better organization
src/middleware/notifications.ts New middleware for campaign notification badges
src/lib/email.ts Campaign invite email templates
src/services/authorize.ts Extended authorization to support DM and party member access to characters
src/services/listCharacters.ts Refactored to support filtering by campaign or user
Character panels Added isReadOnly prop support for DM viewing of player characters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@igor47 igor47 merged commit bb2b939 into main Dec 10, 2025
8 checks passed
@igor47 igor47 deleted the igor/campaigns-v0 branch December 10, 2025 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

party mode

2 participants